import { createApp } from "vue";
import "./style.css";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import App from "./App.vue";
import router from "./router";
import store from "./store";

import "./assets/styles/global.css";
import localforage from "localforage";

const app = createApp(App);

// 配置 localForage
localforage.config({
  driver: localforage.INDEXEDDB, // 使用 IndexedDB
  name: "Practise Vue",
  version: 1.0,
  storeName: "vuepracitces" // 存储名称
});

app.config.globalProperties.$localforage = localforage; // 将 localForage 添加到全局属性

app.use(router);
app.use(store);
app.use(ElementPlus);
app.mount("#app");
